package com.miaoshaproject.response;

import com.miaoshaproject.error.CommonError;

import java.util.Objects;

/**
 * Created by kenny on 2019/1/5.
 */
public class CommonReturnType {



    // 表明对应的请求返回是success



    private String status;
    private Object data;


    public static CommonReturnType create(Object result){

        return CommonReturnType.create(result,"success");
    }

    public static CommonReturnType create(Object result, String status){
        CommonReturnType type = new CommonReturnType();
        type.setStatus(status);
        type.setData(result);
        return type;

    }


    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
